package leetcode.code0080;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution80 implements IDebug {

	public abstract int removeDuplicates(int[] nums);

	@Override
	public void debug1() {
		int[] nums = HelpDebug.str2array3("[1,1,1,2,2,3]");
		int r = this.removeDuplicates(nums);
		int e = 5;
		int[] res = HelpDebug.str2array3("[1,1,2,2,3]");
		HelpDebug.compare(e, r);
		HelpDebug.compare(res, nums);
	}

	@Override
	public void debug2() {
		int[] nums = HelpDebug.str2array3("[0,0,1,1,1,1,2,3,3]");
		int r = this.removeDuplicates(nums);
		int e = 7;
		int[] res = HelpDebug.str2array3("[0,0,1,1,2,3,3]");
		HelpDebug.compare(e, r);
		HelpDebug.compare(res, nums);
	}

	@Override
	public void debug3() {
		int[] nums = HelpDebug.str2array3("[0,1,2,3]");
		int r = this.removeDuplicates(nums);
		int e = 4;
		int[] res = HelpDebug.str2array3("[0,1,2,3]");
		HelpDebug.compare(e, r);
		HelpDebug.compare(res, nums);
	}

	@Override
	public void debug4() {
		int[] nums = HelpDebug.str2array3("[0]");
		int r = this.removeDuplicates(nums);
		int e = 1;
		int[] res = HelpDebug.str2array3("[0]");
		HelpDebug.compare(e, r);
		HelpDebug.compare(res, nums);
	}
	public void debug5() {
		int[] nums = HelpDebug.str2array3("[0,0,0,1,2,2,4,4]");
		int r = this.removeDuplicates(nums);
		int e = 7;
		int[] res = HelpDebug.str2array3("[0,0,1,2,2,4,4]");
		HelpDebug.compare(e, r);
		HelpDebug.compare(res, nums);
	}

}
